﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using c2iGMailNotifier.ViewModel;
using Microsoft.WindowsAPICodePack.Dialogs;

namespace c2iGMailNotifier.View
{
    /// <summary>
    /// Logique d'interaction pour OptionsVIew.xaml
    /// </summary>
    public partial class OptionsView : UserControl
    {
        public OptionsView()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
        	System.Diagnostics.Process.Start("http://www.c2i.fr/c2iGmailNotifier");
        }

        private void btnChooseFileName_Click(object sender, RoutedEventArgs e)
        {
            CommonOpenFileDialog dlg = new CommonOpenFileDialog();
            dlg.Filters.Add(new CommonFileDialogFilter("Sound filter", "*.wav, *.mp3"));
            dlg.DefaultDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            if (dlg.ShowDialog() == CommonFileDialogResult.OK)
            {
                txtNotificationSoundFileName.Text = dlg.FileName;
            }
        }

    }
}